package com.study.service2.controller;

import com.study.api.service.ProductService;
import com.study.service2.service.ProductServiceSentinel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ProductConsumerController {

    @Resource
    ProductService productService;

    @Resource
    ProductServiceSentinel productServiceSentinel;

    @GetMapping("/hi")
    public String hi(){
//        return productServiceSentinel.hi();
        return productService.hi();

    }

    @GetMapping("hello")
    public String hello(){
//        return productServiceSentinel.hello();
        return productService.hello();

    }

    @GetMapping("test")
    public String test(){
        return "Test is success!";

    }


}
